-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix]: Solr remote url and properties settings #36
base: master
Are you sure you want to change the base?
Conversation
a2f074e
to
3ffa03f
Compare
Changes
TestTo ensure the fix is working, you can reproduce the following steps:
FROM xwiki:14
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["xwiki"]
docker build -t gridexx/xwiki .
docker run --rm -p 8080:8080 --name xwiki -e INDEX_HOST=solr -e INDEX_PORT=7000 gridexx/xwiki
docker exec xwiki cat /usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.properties | grep solr Here is the output: solr.type=remote
#-# The default is the subfolder "store/solr" inside folder defined by the property "environment.permanentDirectory".
# solr.embedded.home=/var/local/xwiki/store/solr
solr.remote.baseURL=http://solr:7000/solr/xwiki
... As we can see, we get the expected properties filled |
Thanks @GridexX I see several open issues related to Solr, see https://jira.xwiki.org/issues/?jql=text%20~%20%22solr%22%20and%20resolution%20%3D%20Unresolved%20and%20project%20%3D%20%22XWiki%20Docker%20images%22%20 Is this PR trying to fix https://jira.xwiki.org/browse/XDOCKER-183 ? Note that the way we work is by having a jira issue first and then doing a PR to fix it (and referencing the issue in the commit). See https://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HRule:AlwaysputaJIRAissuereferenceincommitmessages Also, should the documentation at https://github.com/xwiki/xwiki-docker/blob/master/README.md#using-an-external-solr-service be updated too or not? I've not tested your changes yet but I've noticed that you haven't updated the Thanks! |
3ffa03f
to
8812f1e
Compare
improve replace properties function change solr remote url Signed-off-by: GridexX <[email protected]>
8812f1e
to
a91dcb8
Compare
Hello @vmassol, thanks a lot for the details! The documentation doesn't need to be updated, as I have fixed what was written and didn't work previously. According to what you said, I have modified my PR to include the JR issue number in the commit message and also modified the Feel free to test it when you will have time. Have a nice day ! |
Context
Setting an external instance of Solr isn't working.
As describing in the documentation, you must change the
INDEX_HOST
andINDEX_PORT
for that.It should then update the
xwiki.properties
file with the following content:Test
After some tests, it appears that the properties baseURL is not added in the file.
Step to reproduce this issue
xwiki.properties
file:Which output the following:
As we can see, the baseURL is not the expected one (
http://localhost:8983/solr
). We should have the following value, based on what was filled in the environment variables:solr.remote.baseURL=http://solr:7000/solr
ℹ️ This problem concerns both LTS and Stable version, every docker images are impacted.